import Vuex from 'vuex'
import Vue from 'vue'

Vue.use(Vuex)

export default new Vuex.Store({
    state:{
        isgaoliang:1,
        username:'登录/注册',
        address:'深圳大学城',
        gettemperature:{},
        toggle:false,
        latitude:22.58846,
        longitude:113.97459,
        detailPageMsg:{},
        id:'',
    },
    mutations:{
        GETINDEX:function(state,n){
            state.isgaoliang=n
        },
        'GETUSER':function(state,val){  
            state.username = val
            console.log(val)
        }
        // ISSHOWGOTOP(state){
            
        // }
    },
    getters:{

    },
    actions:{
        'GETUSER':function(context){
            setTimeout(function(){
                context.commit('GETUSER')
            })
        }
    }
})